//
//  LXAPMKitHomeWindow.m
//  APMDemo
//
//  Created by Jack on 2020/7/17.
//  Copyright © 2020 LX. All rights reserved.
//

#import "LXAPMKitHomeWindow.h"
#import "LXAPMKitDefine.h"
#import "LXHomePluginVC.h"

@implementation LXAPMKitHomeWindow

+ (instancetype)shareInstance{
    static LXAPMKitHomeWindow *homeWindow = nil;
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        homeWindow = [[LXAPMKitHomeWindow alloc] init];
    });
    return homeWindow;
}

- (id)initWithFrame:(CGRect)frame{
    
    frame = CGRectMake(0, 0, LXAPMKitScreenWidth, LXAPMKitScreenHeight);
    self = [super initWithFrame:frame];
    if (self) {
        [self setupUI];
    }
    return self;
}

- (void)setupUI{
    
    self.backgroundColor     = [UIColor clearColor];
    self.windowLevel         = UIWindowLevelStatusBar - 1;
    self.rootViewController  = [[LXHomePluginVC alloc] init];
    [self.window makeKeyAndVisible];
}


@end
